package com.hdoit.ares.logical.ser.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import com.hdoit.ares.logical.ser.model.GoodsService;
import com.hdoit.ares.logical.viewmodel.ser.GoodsServiceSearch;
import com.tennetcn.common.dao.base.IMapper;
import com.tennetcn.common.message.PagerModel;

/**
 * @author      lvsi
 * @email       
 * @createtime  2017年11月22日 14:19:12
 * @comment
 */
@Repository(value="goodsServiceMapper")
public interface GoodsServiceMapper extends IMapper<GoodsService>{

	public int queryGoodsServiceCount(@Param("search")GoodsServiceSearch goodsServiceSearch);
	
	public List<GoodsService> queryGoodsServiceList(@Param("search")GoodsServiceSearch goodsServiceSearch,@Param("pager")PagerModel pagerModel);
	
	public GoodsService queryGoodsServiceModel(String key);
	
	public List<GoodsService> queryFirstGoods(@Param("serviceTypeName")String serviceTypeName,@Param("serviceName")String  serviceName,@Param("deleteMark")String deleteMark);
	
	public Integer queryMaxGoodsSortCode();

	//店铺主人查看的商品界面
	public int queryGoodsServiceCountById(@Param("search")GoodsServiceSearch goodsServiceSearch,@Param("loginId")String loginId);
	
	public List<GoodsService> queryGoodsServiceListById(@Param("search")GoodsServiceSearch goodsServiceSearch,@Param("pager")PagerModel pagerModel,@Param("loginId")String loginId);
	
	//店铺员工查看的商品界面
	public int queryStoreGoodsCountById(@Param("search")GoodsServiceSearch goodsServiceSearch,@Param("loginId")String loginId);
	
	public List<GoodsService> queryStoreGoodsById(@Param("search")GoodsServiceSearch goodsServiceSearch,@Param("pager")PagerModel pagerModel,@Param("loginId")String loginId);
	
	//微信select查看商品详情
	public GoodsService queryModelById(String id);

	public int updateLargePicById(@Param("id")String id);
	
	public int updateSmallPicById(@Param("id")String id);
}
